//
//  unittestBuyCard() .c
//  Dominion
//
//  Eric Hook
//  hooke@onid.orst.edu
//  CS362 Winter 2014
//

#include "dominion.h"
#include "dominion_helpers.h"
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include "rngs.h"

int seed = 1000;
int k[10] = {adventurer, council_room, feast, gardens, mine, remodel, smithy, village, baron, great_hall};

void testFullDeckCount() {
    int result = 0;
    struct gameState G;
    
    printf ("TESTING: fullDeckCount(int player, int card, struct gameState *state) : unittest1.c.\n");
    
    memset(&G, 23, sizeof(struct gameState));       // clear the game state
    
    result = initializeGame(2, k, seed, &G);
    
    printf ("Initial player[0] deckcount (%d) and handcount (%d) and discardcount (%d).\nAfter fullDeckCount...", G.deckCount[0], G.handCount[0], G.discardCount[0] );
    
    int returnVal = fullDeckCount(0, -1, &G);       // pass in invalid card, should NOT be found anywhere in deck
    
    printf ("Initial player[0] deckcount (%d) and handcount (%d) and discardcount (%d).\nAfter fullDeckCount...", G.deckCount[0], G.handCount[0], G.discardCount[0] );
    printf ("Returns %d\n", returnVal);
    assert(returnVal == 0);
    
    printf ("!!! PASS: fullDeckCount(int player, int card, struct gameState *state) : unittest1.c.\n");
}

int main () {
    testFullDeckCount();
    return 0;
}